<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FacilityTypeList.ascx.cs" Inherits="FacilityTypeList" %>
<table>
    <tr>
        <td style="width: 196px">
            Enter name of facility to search:</td>
        <td style="width: 100px">
            <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox></td>
        <td style="width: 100px">
            <asp:LinkButton ID="lnkSearch" runat="server" CssClass="c_button">Search</asp:LinkButton></td>
    </tr>
</table>
<asp:Label ID="Label1" runat="server" Text="List of facility types:"></asp:Label><br />
<asp:GridView ID="dgrFacType" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
    OnRowCancelingEdit="dgrFacType_RowCancelingEdit" OnRowEditing="dgrFacType_RowEditing"
    OnRowUpdating="dgrFacType_RowUpdating" CssClass="list_table">
    <Columns>
        <asp:TemplateField>     
            <ItemTemplate>
                <asp:CheckBox ID="chkChoice" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Name">        
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="State">      
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# GetState(Eval("State")) %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Description">        
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <a href="Default.aspx?ctrl=fac_type&mode=1&id=<%#Eval("Id") %>">Edit</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<div id="paging_bar"><asp:Label ID="lblPaging" runat="server"></asp:Label></div> 
<asp:LinkButton CssClass="lnkDelete" ID="lnkDelete" runat="server" OnClientClick="return confirm('Are you sure want to delete selected items?');" OnClick="lnkDelete_Click">Delete selected items</asp:LinkButton>
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>